import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// 引入ElementUI并配置
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.config.productionTip = false;

// 引入axios并配置
import axios from "axios";
axios.defaults.baseURL = 'http://localhost:8080';

// 添加Axios响应拦截器
axios.interceptors.response.use(
    function (response) {
      return response.data;
    },
    function (error) {
      console.log(error);
    }
);

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: function (h) { return h(App) }
}).$mount('#app')
